﻿#include "ZShadowEffect.h"
#include <QGraphicsDropShadowEffect>

class ZShadowEffectPrivate
{
public:
    ZShadowEffectPrivate()
    {
        m_shadow_width = 3;
        m_shadow_offset = QPoint(0, 0);
        m_shadow_color = QColor(100, 100, 100);
    }

    quint32 m_shadow_width;
    QPoint  m_shadow_offset;
    QColor  m_shadow_color;
};

ZShadowEffect::ZShadowEffect(QObject *parent) : QObject(parent)
{
    m_data = new ZShadowEffectPrivate;
}

ZShadowEffect::~ZShadowEffect()
{
    delete m_data;
}

void ZShadowEffect::setShadowWidth(quint32 width)
{
    m_data->m_shadow_width = width;
}

void ZShadowEffect::setShadowOffset(const QPoint &offset)
{
    m_data->m_shadow_offset = offset;
}

void ZShadowEffect::setShadowColor(const QColor &color)
{
    m_data->m_shadow_color = color;
}

quint32 ZShadowEffect::getShadowWidth()
{
    return m_data->m_shadow_width;
}

QPoint ZShadowEffect::getShadowOffset()
{
    return m_data->m_shadow_offset;
}

QColor ZShadowEffect::getShadowColor()
{
    return m_data->m_shadow_color;
}
